﻿using System;
using System.Collections.Generic;
 
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class per_reset : MpageBase
{ 
    protected Model.CMember CMember = null;
    protected void Page_Load(object sender, EventArgs e)
    { 
        if (loginUserInfo != null && loginUserInfo.Id > 0)
        {
            CMember = BLL.CMember.GetModel(loginUserInfo.Id);
        }
    }
    protected void resetBtn_Click(object sender, EventArgs e)
    {
        if (CMember.zhifuPassword.Equals(BLL.Security.MD5(pass.Text.Trim())))
        {
            CMember.mibaoQustion = questionDdl.SelectedItem.Text;
            CMember.mibaoAnswer = answer.Text.Trim();
            System.Web.HttpContext.Current.Session[BLL.CMember.LoginUserSessionKey] = CMember;
            if (BLL.CMember.Update(CMember) > 0)
            {
                alertmessageAndGoback("密保问题设置成功！");
            }
        }
        else
        {
            alertmessageAndGoback("支付密码错误！");
        }
    }
}